import json


class ReadUtil:
    # 封装读取json文件的方法
    @classmethod
    def read_config(cls,file_path,key):
        with open(file_path,"r",encoding="utf-8") as f:
            data = json.load(f).get(key)
            # 定义一个list
            list1 = []
            for i in data:
                temp = tuple(i.values())
                list1.append(temp)
            return list1

if __name__ == '__main__':
    result =  ReadUtil.read_config("../data/regist_login.json","image_code")
    print(result)